package com.zixuan.sina.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zixuan.sina.entity.Comment;
import com.zixuan.sina.entity.MessageLog;
import com.zixuan.sina.entity.User;
import com.zixuan.sina.entity.UserRelactionShip;
import com.zixuan.sina.entity.vo.FriendListVo;
import com.zixuan.sina.entity.vo.MessageLogVo;
import com.zixuan.sina.utils.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserReflectionShipMapper extends BaseMapper<UserRelactionShip> {


    List<FriendListVo> listFriendList(@Param("userId") String userId);

    void addMessage(@Param("messageLog") MessageLog messageLog);


    List<MessageLogVo> getMessageById(@Param("userId") String userId, @Param("friendId") String friendId);

    User findFriendInfoById( @Param("userId") String userId,@Param("friendId") String friendId);


    int createFriendShip(@Param("userRelactionShip")  UserRelactionShip userRelactionShip);

    int selectConnectShip(@Param("userRelactionShip") UserRelactionShip userRelactionShip);


    Long isFriendRelation(@Param("userId") String userId,@Param("friendId") String friendId);
    List<MessageLog> getMessagePreview(@Param("userId") String userId,@Param("friendId") String friendId);
}
